package com.epam.entity;

public class Hotel extends AbstractEntity {

	private int hotelId;
	private String name;
	private int stars;
	private boolean tv;
	private boolean conditioning;
	private Feeding feeding;

	public enum Feeding {
		HB, BB, AI
	}

	public Hotel() {
	}

	public Hotel(HotelBuilder builder) {
		hotelId = builder.hotelId;
		name = builder.name;
		stars = builder.stars;
		tv = builder.tv;
		conditioning = builder.conditioning;
		feeding = builder.feeding;

	}

	public static class HotelBuilder {
		private int hotelId;
		private String name;
		private int stars;
		private boolean tv;
		private boolean conditioning;
		private Feeding feeding;

		public HotelBuilder() {
		}

		public HotelBuilder name(String name) {
			this.name = name;
			return this;
		}

		public HotelBuilder stars(int stars) {
			this.stars = stars;
			return this;

		}

		public HotelBuilder tv(boolean tv) {
			this.tv = tv;
			return this;
		}

		public HotelBuilder conditioning(boolean conditioning) {
			this.conditioning = conditioning;
			return this;
		}

		public HotelBuilder feeding(Feeding feeding) {
			this.feeding = feeding;
			return this;
		}
		
		public HotelBuilder id(int hotelId) {
			this.hotelId = hotelId;
			return this;
		}

		public Hotel build() {
			return new Hotel(this);
		}

	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getStars() {
		return stars;
	}

	public void setStars(int stars) {
		this.stars = stars;
	}

	public boolean isTv() {
		return tv;
	}

	public void setTv(boolean tv) {
		this.tv = tv;
	}

	public boolean isConditioning() {
		return conditioning;
	}

	public void setConditioning(boolean conditioning) {
		this.conditioning = conditioning;
	}

	public Feeding getFeeding() {
		return feeding;
	}

	public void setFeeding(Feeding feeding) {
		this.feeding = feeding;
	}

	public int getHotelId() {
		return hotelId;
	}

	public void setHotelId(int hotelId) {
		this.hotelId = hotelId;
	}
	
	public String toString(Hotel hotel) {
		String result = "Name: " + hotel.getName();
		return result;
	}

}
